package com.snopy.designPattern.create.builder;

import com.snopy.designPattern.create.builder.element.Chip;
import com.snopy.designPattern.create.builder.element.Outward;
import com.snopy.designPattern.create.builder.element.Screen;
import lombok.Getter;
import lombok.Setter;

/**
 * @author snopy
 * @version 1.0.0
 * @classname PhoneBuild
 * @description
 * @email 77912204@qq.com
 * @date 2022/03/01 20:21
 */
@Setter
@Getter
public class PhoneBuild implements Builder{
    private Phone phone = new Phone();

    @Override
    public Builder buildChip(Chip chip) {
        phone.setChip(chip);
        return this;
    }

    @Override
    public Builder buildOutward(Outward outward) {
        phone.setOutward(outward);
        return this;
    }

    @Override
    public Builder buildScreen(Screen screen) {
        phone.setScreen(screen);
        return this;
    }
    public Phone getPhone(){
        return this.phone;
    }
}
